## 1
key={'key1':80,'key2':85,'key3':90}
print('最高分数是：',max(key.values()))
print('最低分数是：',min(key.values()))
print('平均分数是：',sum(key.values())/len(key.keys()))
print(key.items())

stu={
    'Simon':{'cs':85,'math':80,'English':95},
    'Lawrence':{'cs':60,'math':99,'English':85},
    'Lili':{'cs':100,'math':99,'English':99},
    'kk':{'cs':60,'math':65,'English':61},
    'momo':{'cs':59,'math':80,'English':90}
    }
print(stu.items())
name=input('请输入你要查询的人：')
print("最高分的科目和对应的分数是：")
if(name=='Simon'):print('English')
if(name=='Lawrence'):print('English')
if(name=='Lili'):print('cs')
if(name=='kk'):print('math')
if(name=='momo'):print('English')
print(max(stu[name]['cs'],stu[name]['math'],stu[name]['English']))
n=max(85+80+95,60+99+85,100+99+99,60+65+61,59+80+90)/3
print("最高分的同学是：Lili  均分为：",n)


## 2
Tom={'死亡诗社','心灵捕手','怦然心动','拳击俱乐部','遗愿清单'}
Mike={'死亡诗社','乱反射','恋恋笔记本','怦然心动','活着'}
Lawrence={'穿条纹睡衣的男孩','末代皇帝','色·戒','死亡诗社'}
print("他们都喜欢的电影是：",Tom&Mike&Lawrence)

##3
import re
str1="If you’re interested in learning more about our app and how you can get involved,pleasedon’thesitatetocontactmeatjohn.doe@example.comorourteamatinfo@hunnu.edu.cnandsomeoneaddress@csu.edu.cn.We’dbehappytoansweranyquestions you may have and provide you with more details about our launch plans."
reg_str1 = r'([\w]+(\.[\w]+)*@[\w]+(\.[\w])+)'
mod = re.compile(reg_str1)

items = mod.findall(str1)
for item in items:
    print(item)